<?php session_start();?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Alrinic Group - NBA tournament</title>
<meta name="keywords" content="NBA website" />
<meta name="description" content="NBA website with ranking" />
<link href="style.css" rel="stylesheet" type="text/css" />
<link href="css/jquery.ennui.contentslider.css" rel="stylesheet" type="text/css" media="screen,projection" />
</head>
<body>
<div id="templatemo_header_wrapper">

	<div id="templatemo_header">
    
    	<div id="site_title">
            <h1><a href="" target="_parent">
                <img src="images/alrinic_logo.png" alt="Web Templates" />
                <span>NBA ranking</span>
            </a></h1>
        </div>
        
        <div id="search_box">
            <form action="#" method="get">
                <input type="text" value="" name="q" size="10" id="searchfield" title="searchfield" onfocus="clearText(this)" onblur="clearText(this)" />
                <input type="submit" name="Search" value="Search" alt="Search" id="searchbutton" title="Search" />
            </form>
        </div>
        
        <div class="cleaner"></div>
	</div><!-- end of header -->

    	<div id="templatemo_menu">
            <ul>
                <li><a href="index.php" class="current">Home</a></li>
                <li><a href="tournament.php">Tournament</a></li>
                <li><a href="players.php">Players</a></li>
                <li><a href="teams.php">Teams and clubs</a></li>
                <li><a href="contact.php">Contact Us</a></li>
            </ul>    	
    	</div><!-- end of templatemo_menu -->
        
        <div id="templatemo_banner">
            
                <div id="one" class="contentslider">
                    <div class="cs_wrapper">
                        <div class="cs_slider">
                        
                            <div class="cs_article">
                            	
								<?php if(!isset($_SESSION['myusername'])) {?>
								
                                <div class="left">
                                    <h2>Crazy colorful basket shoes of our mind-blowing players !</h2>
                                    <p>"<em>AlRiNic</em> Group allows you to check information about every players registered in our Database ! Click on the <strong>Read More</strong> button to go to the related webpage !"</p>
                                    
                                    <div class="button"><a href="players.php">Read more</a></div>
                               	</div>
                                <div class="right">
                               <a href="http://www.enseirb.fr" target="_parent"><img src="images/slider/templatemo_slide02.jpg" alt="Template 1" /></a>
								</div>
                                                                
                            </div><!-- End cs_article -->

							<div class="cs_article">
                                <div class="left">
                                    <h2>Look : a green t-shirt !</h2>
                                    <p>"With <em>AlRiNic</em> website, you can follow your favorite club ! Just click on the <strong>Read More</strong> button and fill the searching form to find your team !"</p>
                                    
                                    <div class="button"><a href="teams.php">Read more</a></div>
                               	</div>
                                <div class="right">
                                <a href="http://www.enseirb.fr" target="_parent"><img src="images/slider/templatemo_slide03.jpg" alt="Template 3" /></a>
                                </div>
                            </div><!-- End cs_article -->							
							
                            <div class="cs_article">
                                <div class="left">
                                    <h2>Basketball is also Physics !</h2>
                                    <p>"You can easily follow the teams rank of a tournament by visiting the related webpage ! Follow the link by clicking on the <strong>Read More</strong> button !"</p>
                                    
                                    <div class="button"><a href="tournament.php">Read more</a></div>
                               	</div>
                                <div class="right">
                                <a href="http://www.enseirb.fr" target="_parent"><img src="images/slider/templatemo_slide01.jpg" alt="Template 2" /></a>
                                </div>
                            </div><!-- End cs_article -->
                         
							<?php } else { ?>
						 
                            <div class="cs_article">
                                <div class="left">
                                    <h2>Welcome <?php echo '"<strong>' . $_SESSION['myusername'] . '</strong>"'; ?></h2>
                                    <p>As a Web Administrator, you can also modify the database. Please follow the link by clicking on the <strong>Read More</strong> 
									or the link on the bottom-left corner of <strong>that main page</strong> to get every modification you can do ! </p>
                                    
                                    <div class="button"><a href="modification.php">Read more</a></div>
                               	</div>
                                <div class="right">
                                <a href="http://www.enseirb.fr" target="_parent"><img src="images/slider/templatemo_slide04.jpg" alt="Template 4" /></a>
                                </div>
                            </div><!-- End cs_article -->
                      
							<?php } ?>
					  
                        </div><!-- End cs_slider -->
                    </div><!-- End cs_wrapper -->
                </div><!-- End contentslider -->
                
                <!-- Site JavaScript -->
                <script type="text/javascript" src="js/jquery-1.3.1.min.js"></script>
                <script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
                <script type="text/javascript" src="js/jquery.ennui.contentslider.js"></script>
                <script type="text/javascript">
                    $(function() {
                    $('#one').ContentSlider({
                    width : '920px',
                    height : '200px',
                    speed : 800,
                    easing : 'easeInOutBack'
                    });
                    });
                </script>
                <script src="js/jquery.chili-2.2.js" type="text/javascript"></script>
                <script src="js/chili/recipes.js" type="text/javascript"></script>
                <div class="cleaner"></div>
   
        </div>

</div> <!-- end of header_wrapper -->

<div id="templatemo_content_wrapper_outer">
<div id="templatemo_content_wrapper_inner">
<div id="templatemo_content_wrapper">

	<div id="templatemo_content">

        <h2>A Basket-ball Website</h2>
            
            <p>Inform you about your favorite sport. You can navigate between several sections : 
			Tournament, players and teams/clubs. Each of them, allows you to add, search or compare teams, 
			display scores and players information.</br> 
			  Consultation of the database is free for every anonymous 
			websurfer but critical modification can only be done by a web administrator logged in with the 
			log part on the bottom-left corner.</p>
			
			<?php include('include/index.php'); ?>
			
       	<div <div class="cleaner_h40"></div>
            
            <h2>Testimonials</h2>
            
            <blockquote>
            <p>"Thank you Alban to add some PHP to access to our database !"</p>
            
            <cite>Anonymous - <span><a href="http://www.enseirb-matmeca.fr/" >enseirb.fr</a></span></cite></blockquote>			
			
            <blockquote>
            <p>"Such a very pleasant platform !"</p>
            
            <cite>ENSEIRB student - <span><a href="http://www.enseirb-matmeca.fr/" >enseirb.fr</a></span></cite></blockquote>
            
            <div class="cleaner_h40"></div>
            <!-- 
            <h2>Web Templates</h2>
            <div id="recent_project">
                <ul>
                    <li>
                        <a href="#" title="Pro"><img src="images/gallery/thumbnail/image_04.jpg" alt="web template 1" /></a><h5>Professional</h5>
                    </li>
                    <li>
                        <a href="#" title="Motor"><img src="images/gallery/thumbnail/image_06.jpg" alt="web template 2" /></a><h5>Motorcycle</h5>
                    </li>
                </ul>
                
                <div class="cleaner"></div>
                <div class="button float_l"><a href="gallery.html">View All</a></div>
        	</div>
             -->

            
            
        </div> <!-- end of templatemo_content -->
        
        <div id="templatemo_sidebar">
		</br>
            <div class="section_rss_twitter">
        
                <div class="rss_twitter twitter">
                <a href="http://www.enseirb.fr" target="_parent">FOLLOW US <span>on Twitter</span></a>
                </div>
                
                <div class="margin_bottom_20"></div>
                
                <div class="rss_twitter rss">
                <a href="#">SUBSCRIBE <span>rss feeds</span></a>
                </div>
            
            </div>		
		
           <div id="news_section">
                
               <div align="center"><h4>Login space</h4></div>
   
<?php

if(!isset($_SESSION['myusername'])) {
echo'<div class="news_box">';
echo'<table width="230" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<form name="form1" method="post" action="checklogin.php">
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td colspan="3"><strong>Member Login </strong></td>
</tr>
<tr>
<td width="78">Username</td>
<td width="6">:</td>
<td width="294"><input name="myusername" type="text" id="myusername"></td>
</tr>
<tr>
<td>Password</td>
<td>:</td>
<td><input name="mypassword" type="password" id="mypassword"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><input type="submit" name="Submit" value="Login"></td>
</tr>
</table>
</td>
</form>
</tr>
</table>';

}

else {

echo'
<div class="news_box" align=center>';
//echo'<h4>Connection information:</h4>';
echo'<p>You are now logged as <strong>' . $_SESSION['myusername'] . '</strong></br>';
echo'<a href="modification.php">Access to the modification webpage</a>';
echo'<div class="button"><a href="logout.php">Log Out</a></div></p>';
echo'</div>';
			  
}
?>
                             
                <div class="cleaner"></div>  
                   
            </div>
                   
            <div class="cleaner"></div>
        </div> <!-- end of sidebar -->

	<div class="cleaner"></div>
</div>
</div>
</div>
        
<div id="templatemo_footer_wrapper">
    <div id="templatemo_footer">

	     <ul class="footer_menu">
            <li><a href="index.php">Home</a></li>
            <li><a href="tournament.php">Tournament</a></li>
            <li><a href="players.php">Players</a></li>
            <li><a href="teams.php">Clubs and Teams</a></li>
            <li class="last_menu"><a href="contact.php">Contact</a></li>
        </ul>
    
        Copyright © 2012 <a href="#">AlRiNic Project</a> | 
        Designed by AlRiNic members | 
        AlRiNic group &amp; ENSEIRB-MATMECA
        		 
    
</div> <!-- end of footer -->

</div> <!-- end of footer_wrapper -->

</body>
</html>
